<!DOCTYPE html>
<html>
   <head>
      <title>Bootstrap 模板</title>
	  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" charset="UTF-8" >
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <link href="css/bootstrap.min.css" rel="stylesheet">
          <link href="css/fileinput.css" rel="stylesheet">
      <script src="js/jquery-1.11.1.min.js"></script>
      <script src="js/bootstrap.min.js"></script>
      <script src="js/fileinput.js"></script>
      <!--[if lt IE 9]>
        <script src="js/html5shiv.js"></script>
        <script src="js/respond.min.js"></script>
      <![endif]-->
   </head>
   <style>
   	body{padding:100px}
   </style>
   <body>
   	<div class="container">
   		<div class="row">
   			<div class="col-xs-8 col-xs-offset-2">
   				<form>
	   				<div class="form-group">
		   				<input  name="img" class="fileinput" type="file"/>
	   				</div>
   				</form>
   			</div>
   		</div>
   	</div>
   	<script>
   		$('.fileinput').fileinput({
   			uploadUrl:'up.php',
   			textEncoding:'UTF-8',//文本编码
   			//maxFileSize:200//设置上传照片大小
   			removeLabel:'删除',//删除的中文显示
   			removeTitle:'删除你所选中的文件',
   			cancelLabel:'取消',
   			browseLabel:'浏览',
   			uploadLabel:'上传',
   			showUpload:true,//true显示上传，false隐藏上传
   			showCancel:true,//false隐藏cancelLabel，true显示
   			showRemove:true,//false隐藏删除，true显示删除
   			showPreview:true,//false隐藏预览框，true显示预览框
   			showCaption:true,//false隐藏input框，true显示input
   			uploadExtraData:true,
   			
   		});
   	</script>
 </body>
      